#!Makefile

EXE_NAME = compiler.exe

CSRC = main.cpp compiler.cpp lexial.cpp parser.cpp error.cpp semantic.cpp generator.cpp
COBJ = $(patsubst %.cpp, %.o, $(CSRC))


all: $(EXE_NAME)

$(EXE_NAME): $(COBJ)
	$(CC) $^ -o $@ $(CCFLAGE)

%.o: %.cpp
	$(CC) $< -o $@ $(CCFLAGE) -c 

install:
	cp $(EXE_NAME) ../bin

.PHONY: clean install 

clean:
	@rm -rf $(EXE_NAME) *.o CMakeFiles/ cmake_install.cmake CMakeCache.txt Makefile *.dSYM

